package com.ls.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

/**
 * <p>
 * 预定表
 * </p>
 *
 * @author pengyu
 * @since 2024-06-28
 */
@NoArgsConstructor
@Data
@EqualsAndHashCode(callSuper = false)
public class Booking extends Model<Booking> {
    private static final long serialVersionUID=1L;
    /**
     * 自增主键
     */
    @TableId(value = "booking_id", type = IdType.AUTO)
    private Long bookingId;
    /**联系人id*/
    private Long linkmanId;
    private Long companyId;
    private Long customerId;
    /**场地id*/
    private Long seatingId;
    /**卡座id*/
    private Long boothId;
    /**预定日期*/
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private LocalDate bookingDay;
    /**预定时段 1早餐，2午餐，3下午茶，4晚餐*/
    private Integer timeId;
    @JsonFormat(pattern = "HH:mm", timezone = "GMT+8")
    @JSONField(format = "HH:mm")
    private LocalTime startTime;
    /**时段结束时间*/
    @JsonFormat(pattern = "HH:mm", timezone = "GMT+8")
    @JSONField(format = "HH:mm")
    private LocalTime endTime;
    /**跟进类型 1预定，2沟通 默认1*/
    private Integer bookingType;
    /**信息来源 1电话，2短信，3现场，4微信，5其他，6系统 默认1*/
    private Integer bookingSource;
    /**预计到店时间*/
    @JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
    @JSONField(format = "HH:mm:ss")
    private LocalTime arrivalTime;
    /**预计到店人数*/
    private Integer arrivalNum;
    /**预定状态 1已预定未发送短信，2已修改未发送短信，3已到店，4已完成，5已取消，7预定已经发送短信，8修改已发送短信*/
    private Integer bookingStatus;
    /**创建时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    /**更新时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    @Override
    protected Serializable pkVal() {
        return this.bookingId;
    }
}
